﻿using System.Data.Entity;
using StoreManager.Models;

namespace StoreManager
{
    public class StoreManagerContext : DbContext
    {
        // You can add custom Code to this file. Changes will not be overwritten.
        // 
        // If you want Entity Framework to drop and regenerate your database
        // automatically whenever you change your model schema, add the following
        // Code to the Application_Start method in your Global.asax file.
        // Note: this will destroy and re-create your database with every model change.
        // 
        // System.Data.Entity.Database.SetInitializer(new System.Data.Entity.DropCreateDatabaseIfModelChanges<StoreManager.StoreManagerContext>());

        public StoreManagerContext()
            : base("Name=DefaultConnection")
        {
        }

        public DbSet<Product> Products { get; set; }

        public DbSet<ImportOrder> ImportOrders { get; set; }
        public DbSet<ProductType> ProductTypes { get; set; }
        public DbSet<PackageType> PackageTypes { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public DbSet<SMCode> SMCodes { get; set; }
        public DbSet<Customer> Customers { get; set; }
        public DbSet<Staff> Staffs { get; set; }
        public DbSet<Supplier> Suppliers { get; set; }
        public DbSet<ImportOrderDetail> ImportOrderDetails { get; set; } 
    }
}
